<div id="app"></div>

<script src="./1.js"></script>
<script src="./2.js"></script>
<script src="./3.js"></script>

<script type="text/babel">
    class Jishuqi extends React.Component {
        constructor() {
            super();
            this.state = {
                n: 1
            }
            this.dianji=this.dianji.bind(this);
        }
        dianji() {
            console.log("点击", this)
            // this.setState({  })
            const n = this.state.n+1
            this.setState({n:n})
        }
        render() {
            return (
                <div>
                    <h1>{this.state.n}</h1>
                    <button onClick={this.dianji}>点击</button>
                </div>
            )
        }
    }
    ReactDOM.render(
        <Jishuqi></Jishuqi>,
        document.getElementById("app")
    )

</script>